package com.visual.echart.controller;

import com.google.common.collect.Lists;
import com.visual.echart.model.UserVO;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * 简介说明:
 *
 * @author: biboyuzhou
 * @date: 2025/06/14 20:47:06
 * @version:1.0
 */
@Controller
public class IndexController {
    @GetMapping("/index")
    public String index() {
        return "index";
    }

    @GetMapping("/users")
    public String users(Model model) {
        List<UserVO> users = Lists.newArrayList(new UserVO(1L, "huahua", "1@qq.com"), new UserVO(2L, "xiaoming", "2@qq.com"), new UserVO(3L, "lin", "3@qq.com"));
        model.addAttribute("users", users);
        return "users";
    }
}
